1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module gdk.c.types; 26 27 public import cairo.c.types; 28 public import gdkpixbuf.c.types; 29 public import gio.c.types; 30 public import glib.c.types; 31 public import gobject.c.types; 32 public import pango.c.types; 33 34 35 /** 36 * Positioning hints for aligning a surface relative to a rectangle. 37 * 38 * These hints determine how the surface should be positioned in the case that 39 * the surface would fall off-screen if placed in its ideal position. 40 * 41 * For example, %GDK_ANCHOR_FLIP_X will replace %GDK_GRAVITY_NORTH_WEST with 42 * %GDK_GRAVITY_NORTH_EAST and vice versa if the surface extends beyond the left 43 * or right edges of the monitor. 44 * 45 * If %GDK_ANCHOR_SLIDE_X is set, the surface can be shifted horizontally to fit 46 * on-screen. If %GDK_ANCHOR_RESIZE_X is set, the surface can be shrunken 47 * horizontally to fit. 48 * 49 * In general, when multiple flags are set, flipping should take precedence over 50 * sliding, which should take precedence over resizing. 51 */ 52 public enum GdkAnchorHints 53 { 54 /** 55 * allow flipping anchors horizontally 56 */ 57 FLIP_X = 1, 58 /** 59 * allow flipping anchors vertically 60 */ 61 FLIP_Y = 2, 62 /** 63 * allow sliding surface horizontally 64 */ 65 SLIDE_X = 4, 66 /** 67 * allow sliding surface vertically 68 */ 69 SLIDE_Y = 8, 70 /** 71 * allow resizing surface horizontally 72 */ 73 RESIZE_X = 16, 74 /** 75 * allow resizing surface vertically 76 */ 77 RESIZE_Y = 32, 78 /** 79 * allow flipping anchors on both axes 80 */ 81 FLIP = 3, 82 /** 83 * allow sliding surface on both axes 84 */ 85 SLIDE = 12, 86 /** 87 * allow resizing surface on both axes 88 */ 89 RESIZE = 48, 90 } 91 alias GdkAnchorHints AnchorHints; 92 93 /** 94 * Flags describing the current capabilities of a device/tool. 95 */ 96 public enum GdkAxisFlags 97 { 98 /** 99 * X axis is present 100 */ 101 X = 2, 102 /** 103 * Y axis is present 104 */ 105 Y = 4, 106 /** 107 * Scroll X delta axis is present 108 */ 109 DELTA_X = 8, 110 /** 111 * Scroll Y delta axis is present 112 */ 113 DELTA_Y = 16, 114 /** 115 * Pressure axis is present 116 */ 117 PRESSURE = 32, 118 /** 119 * X tilt axis is present 120 */ 121 XTILT = 64, 122 /** 123 * Y tilt axis is present 124 */ 125 YTILT = 128, 126 /** 127 * Wheel axis is present 128 */ 129 WHEEL = 256, 130 /** 131 * Distance axis is present 132 */ 133 DISTANCE = 512, 134 /** 135 * Z-axis rotation is present 136 */ 137 ROTATION = 1024, 138 /** 139 * Slider axis is present 140 */ 141 SLIDER = 2048, 142 } 143 alias GdkAxisFlags AxisFlags; 144 145 /** 146 * Defines how device axes are interpreted by GTK. 147 * 148 * Note that the X and Y axes are not really needed; pointer devices 149 * report their location via the x/y members of events regardless. Whether 150 * X and Y are present as axes depends on the GDK backend. 151 */ 152 public enum GdkAxisUse 153 { 154 /** 155 * the axis is ignored. 156 */ 157 IGNORE = 0, 158 /** 159 * the axis is used as the x axis. 160 */ 161 X = 1, 162 /** 163 * the axis is used as the y axis. 164 */ 165 Y = 2, 166 /** 167 * the axis is used as the scroll x delta 168 */ 169 DELTA_X = 3, 170 /** 171 * the axis is used as the scroll y delta 172 */ 173 DELTA_Y = 4, 174 /** 175 * the axis is used for pressure information. 176 */ 177 PRESSURE = 5, 178 /** 179 * the axis is used for x tilt information. 180 */ 181 XTILT = 6, 182 /** 183 * the axis is used for y tilt information. 184 */ 185 YTILT = 7, 186 /** 187 * the axis is used for wheel information. 188 */ 189 WHEEL = 8, 190 /** 191 * the axis is used for pen/tablet distance information 192 */ 193 DISTANCE = 9, 194 /** 195 * the axis is used for pen rotation information 196 */ 197 ROTATION = 10, 198 /** 199 * the axis is used for pen slider information 200 */ 201 SLIDER = 11, 202 /** 203 * a constant equal to the numerically highest axis value. 204 */ 205 LAST = 12, 206 } 207 alias GdkAxisUse AxisUse; 208 209 /** 210 * Specifies the crossing mode for enter and leave events. 211 */ 212 public enum GdkCrossingMode 213 { 214 /** 215 * crossing because of pointer motion. 216 */ 217 NORMAL = 0, 218 /** 219 * crossing because a grab is activated. 220 */ 221 GRAB = 1, 222 /** 223 * crossing because a grab is deactivated. 224 */ 225 UNGRAB = 2, 226 /** 227 * crossing because a GTK grab is activated. 228 */ 229 GTK_GRAB = 3, 230 /** 231 * crossing because a GTK grab is deactivated. 232 */ 233 GTK_UNGRAB = 4, 234 /** 235 * crossing because a GTK widget changed 236 * state (e.g. sensitivity). 237 */ 238 STATE_CHANGED = 5, 239 /** 240 * crossing because a touch sequence has begun, 241 * this event is synthetic as the pointer might have not left the surface. 242 */ 243 TOUCH_BEGIN = 6, 244 /** 245 * crossing because a touch sequence has ended, 246 * this event is synthetic as the pointer might have not left the surface. 247 */ 248 TOUCH_END = 7, 249 /** 250 * crossing because of a device switch (i.e. 251 * a mouse taking control of the pointer after a touch device), this event 252 * is synthetic as the pointer didn’t leave the surface. 253 */ 254 DEVICE_SWITCH = 8, 255 } 256 alias GdkCrossingMode CrossingMode; 257 258 /** 259 * A pad feature. 260 */ 261 public enum GdkDevicePadFeature 262 { 263 /** 264 * a button 265 */ 266 BUTTON = 0, 267 /** 268 * a ring-shaped interactive area 269 */ 270 RING = 1, 271 /** 272 * a straight interactive area 273 */ 274 STRIP = 2, 275 } 276 alias GdkDevicePadFeature DevicePadFeature; 277 278 /** 279 * Indicates the specific type of tool being used being a tablet. Such as an 280 * airbrush, pencil, etc. 281 */ 282 public enum GdkDeviceToolType 283 { 284 /** 285 * Tool is of an unknown type. 286 */ 287 UNKNOWN = 0, 288 /** 289 * Tool is a standard tablet stylus. 290 */ 291 PEN = 1, 292 /** 293 * Tool is standard tablet eraser. 294 */ 295 ERASER = 2, 296 /** 297 * Tool is a brush stylus. 298 */ 299 BRUSH = 3, 300 /** 301 * Tool is a pencil stylus. 302 */ 303 PENCIL = 4, 304 /** 305 * Tool is an airbrush stylus. 306 */ 307 AIRBRUSH = 5, 308 /** 309 * Tool is a mouse. 310 */ 311 MOUSE = 6, 312 /** 313 * Tool is a lens cursor. 314 */ 315 LENS = 7, 316 } 317 alias GdkDeviceToolType DeviceToolType; 318 319 /** 320 * Used in `GdkDrop` and `GdkDrag` to indicate the actions that the 321 * destination can and should do with the dropped data. 322 */ 323 public enum GdkDragAction 324 { 325 /** 326 * Copy the data. 327 */ 328 COPY = 1, 329 /** 330 * Move the data, i.e. first copy it, then delete 331 * it from the source using the DELETE target of the X selection protocol. 332 */ 333 MOVE = 2, 334 /** 335 * Add a link to the data. Note that this is only 336 * useful if source and destination agree on what it means, and is not 337 * supported on all platforms. 338 */ 339 LINK = 4, 340 /** 341 * Ask the user what to do with the data. 342 */ 343 ASK = 8, 344 } 345 alias GdkDragAction DragAction; 346 347 /** 348 * Used in `GdkDrag` to the reason of a cancelled DND operation. 349 */ 350 public enum GdkDragCancelReason 351 { 352 /** 353 * There is no suitable drop target. 354 */ 355 NO_TARGET = 0, 356 /** 357 * Drag cancelled by the user 358 */ 359 USER_CANCELLED = 1, 360 /** 361 * Unspecified error. 362 */ 363 ERROR = 2, 364 } 365 alias GdkDragCancelReason DragCancelReason; 366 367 /** 368 * Specifies the type of the event. 369 */ 370 public enum GdkEventType 371 { 372 /** 373 * the window manager has requested that the toplevel surface be 374 * hidden or destroyed, usually when the user clicks on a special icon in the 375 * title bar. 376 */ 377 DELETE = 0, 378 /** 379 * the pointer (usually a mouse) has moved. 380 */ 381 MOTION_NOTIFY = 1, 382 /** 383 * a mouse button has been pressed. 384 */ 385 BUTTON_PRESS = 2, 386 /** 387 * a mouse button has been released. 388 */ 389 BUTTON_RELEASE = 3, 390 /** 391 * a key has been pressed. 392 */ 393 KEY_PRESS = 4, 394 /** 395 * a key has been released. 396 */ 397 KEY_RELEASE = 5, 398 /** 399 * the pointer has entered the surface. 400 */ 401 ENTER_NOTIFY = 6, 402 /** 403 * the pointer has left the surface. 404 */ 405 LEAVE_NOTIFY = 7, 406 /** 407 * the keyboard focus has entered or left the surface. 408 */ 409 FOCUS_CHANGE = 8, 410 /** 411 * an input device has moved into contact with a sensing 412 * surface (e.g. a touchscreen or graphics tablet). 413 */ 414 PROXIMITY_IN = 9, 415 /** 416 * an input device has moved out of contact with a sensing 417 * surface. 418 */ 419 PROXIMITY_OUT = 10, 420 /** 421 * the mouse has entered the surface while a drag is in progress. 422 */ 423 DRAG_ENTER = 11, 424 /** 425 * the mouse has left the surface while a drag is in progress. 426 */ 427 DRAG_LEAVE = 12, 428 /** 429 * the mouse has moved in the surface while a drag is in 430 * progress. 431 */ 432 DRAG_MOTION = 13, 433 /** 434 * a drop operation onto the surface has started. 435 */ 436 DROP_START = 14, 437 /** 438 * the scroll wheel was turned 439 */ 440 SCROLL = 15, 441 /** 442 * a pointer or keyboard grab was broken. 443 */ 444 GRAB_BROKEN = 16, 445 /** 446 * A new touch event sequence has just started. 447 */ 448 TOUCH_BEGIN = 17, 449 /** 450 * A touch event sequence has been updated. 451 */ 452 TOUCH_UPDATE = 18, 453 /** 454 * A touch event sequence has finished. 455 */ 456 TOUCH_END = 19, 457 /** 458 * A touch event sequence has been canceled. 459 */ 460 TOUCH_CANCEL = 20, 461 /** 462 * A touchpad swipe gesture event, the current state 463 * is determined by its phase field. 464 */ 465 TOUCHPAD_SWIPE = 21, 466 /** 467 * A touchpad pinch gesture event, the current state 468 * is determined by its phase field. 469 */ 470 TOUCHPAD_PINCH = 22, 471 /** 472 * A tablet pad button press event. 473 */ 474 PAD_BUTTON_PRESS = 23, 475 /** 476 * A tablet pad button release event. 477 */ 478 PAD_BUTTON_RELEASE = 24, 479 /** 480 * A tablet pad axis event from a "ring". 481 */ 482 PAD_RING = 25, 483 /** 484 * A tablet pad axis event from a "strip". 485 */ 486 PAD_STRIP = 26, 487 /** 488 * A tablet pad group mode change. 489 */ 490 PAD_GROUP_MODE = 27, 491 /** 492 * A touchpad hold gesture event, the current state 493 * is determined by its phase field. Since: 4.6 494 */ 495 TOUCHPAD_HOLD = 28, 496 /** 497 * marks the end of the GdkEventType enumeration. 498 */ 499 EVENT_LAST = 29, 500 } 501 alias GdkEventType EventType; 502 503 /** 504 * Used to represent the different paint clock phases that can be requested. 505 * 506 * The elements of the enumeration correspond to the signals of `GdkFrameClock`. 507 */ 508 public enum GdkFrameClockPhase 509 { 510 /** 511 * no phase 512 */ 513 NONE = 0, 514 /** 515 * corresponds to GdkFrameClock::flush-events. Should not be handled by applications. 516 */ 517 FLUSH_EVENTS = 1, 518 /** 519 * corresponds to GdkFrameClock::before-paint. Should not be handled by applications. 520 */ 521 BEFORE_PAINT = 2, 522 /** 523 * corresponds to GdkFrameClock::update. 524 */ 525 UPDATE = 4, 526 /** 527 * corresponds to GdkFrameClock::layout. Should not be handled by applicatiosn. 528 */ 529 LAYOUT = 8, 530 /** 531 * corresponds to GdkFrameClock::paint. 532 */ 533 PAINT = 16, 534 /** 535 * corresponds to GdkFrameClock::resume-events. Should not be handled by applications. 536 */ 537 RESUME_EVENTS = 32, 538 /** 539 * corresponds to GdkFrameClock::after-paint. Should not be handled by applications. 540 */ 541 AFTER_PAINT = 64, 542 } 543 alias GdkFrameClockPhase FrameClockPhase; 544 545 /** 546 * Indicates which monitor a surface should span over when in fullscreen mode. 547 */ 548 public enum GdkFullscreenMode 549 { 550 /** 551 * Fullscreen on current monitor only. 552 */ 553 CURRENT_MONITOR = 0, 554 /** 555 * Span across all monitors when fullscreen. 556 */ 557 ALL_MONITORS = 1, 558 } 559 alias GdkFullscreenMode FullscreenMode; 560 561 /** 562 * The list of the different APIs that GdkGLContext can potentially support. 563 * 564 * Since: 4.6 565 */ 566 public enum GdkGLAPI 567 { 568 /** 569 * The OpenGL API 570 */ 571 GL = 1, 572 /** 573 * The OpenGL ES API 574 */ 575 GLES = 2, 576 } 577 alias GdkGLAPI GLAPI; 578 579 /** 580 * Error enumeration for `GdkGLContext`. 581 */ 582 public enum GdkGLError 583 { 584 /** 585 * OpenGL support is not available 586 */ 587 NOT_AVAILABLE = 0, 588 /** 589 * The requested visual format is not supported 590 */ 591 UNSUPPORTED_FORMAT = 1, 592 /** 593 * The requested profile is not supported 594 */ 595 UNSUPPORTED_PROFILE = 2, 596 /** 597 * The shader compilation failed 598 */ 599 COMPILATION_FAILED = 3, 600 /** 601 * The shader linking failed 602 */ 603 LINK_FAILED = 4, 604 } 605 alias GdkGLError GLError; 606 607 /** 608 * Defines the reference point of a surface and is used in `GdkPopupLayout`. 609 */ 610 public enum GdkGravity 611 { 612 /** 613 * the reference point is at the top left corner. 614 */ 615 NORTH_WEST = 1, 616 /** 617 * the reference point is in the middle of the top edge. 618 */ 619 NORTH = 2, 620 /** 621 * the reference point is at the top right corner. 622 */ 623 NORTH_EAST = 3, 624 /** 625 * the reference point is at the middle of the left edge. 626 */ 627 WEST = 4, 628 /** 629 * the reference point is at the center of the surface. 630 */ 631 CENTER = 5, 632 /** 633 * the reference point is at the middle of the right edge. 634 */ 635 EAST = 6, 636 /** 637 * the reference point is at the lower left corner. 638 */ 639 SOUTH_WEST = 7, 640 /** 641 * the reference point is at the middle of the lower edge. 642 */ 643 SOUTH = 8, 644 /** 645 * the reference point is at the lower right corner. 646 */ 647 SOUTH_EAST = 9, 648 /** 649 * the reference point is at the top left corner of the 650 * surface itself, ignoring window manager decorations. 651 */ 652 STATIC = 10, 653 } 654 alias GdkGravity Gravity; 655 656 /** 657 * An enumeration describing the type of an input device in general terms. 658 */ 659 public enum GdkInputSource 660 { 661 /** 662 * the device is a mouse. (This will be reported for the core 663 * pointer, even if it is something else, such as a trackball.) 664 */ 665 MOUSE = 0, 666 /** 667 * the device is a stylus of a graphics tablet or similar device. 668 */ 669 PEN = 1, 670 /** 671 * the device is a keyboard. 672 */ 673 KEYBOARD = 2, 674 /** 675 * the device is a direct-input touch device, such 676 * as a touchscreen or tablet 677 */ 678 TOUCHSCREEN = 3, 679 /** 680 * the device is an indirect touch device, such 681 * as a touchpad 682 */ 683 TOUCHPAD = 4, 684 /** 685 * the device is a trackpoint 686 */ 687 TRACKPOINT = 5, 688 /** 689 * the device is a "pad", a collection of buttons, 690 * rings and strips found in drawing tablets 691 */ 692 TABLET_PAD = 6, 693 } 694 alias GdkInputSource InputSource; 695 696 /** 697 * Describes how well an event matches a given keyval and modifiers. 698 * 699 * `GdkKeyMatch` values are returned by [method@Gdk.KeyEvent.matches]. 700 */ 701 public enum GdkKeyMatch 702 { 703 /** 704 * The key event does not match 705 */ 706 NONE = 0, 707 /** 708 * The key event matches if keyboard state 709 * (specifically, the currently active group) is ignored 710 */ 711 PARTIAL = 1, 712 /** 713 * The key event matches 714 */ 715 EXACT = 2, 716 } 717 alias GdkKeyMatch KeyMatch; 718 719 /** 720 * `GdkMemoryFormat` describes formats that image data can have in memory. 721 * 722 * It describes formats by listing the contents of the memory passed to it. 723 * So GDK_MEMORY_A8R8G8B8 will be 1 byte (8 bits) of alpha, followed by a 724 * byte each of red, green and blue. It is not endian-dependent, so 725 * CAIRO_FORMAT_ARGB32 is represented by different `GdkMemoryFormats` 726 * on architectures with different endiannesses. 727 * 728 * Its naming is modelled after 729 * [VkFormat](https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VkFormat) 730 * for details). 731 */ 732 public enum GdkMemoryFormat 733 { 734 /** 735 * 4 bytes; for blue, green, red, alpha. 736 * The color values are premultiplied with the alpha value. 737 */ 738 B8G8R8A8_PREMULTIPLIED = 0, 739 /** 740 * 4 bytes; for alpha, red, green, blue. 741 * The color values are premultiplied with the alpha value. 742 */ 743 A8R8G8B8_PREMULTIPLIED = 1, 744 /** 745 * 4 bytes; for red, green, blue, alpha 746 * The color values are premultiplied with the alpha value. 747 */ 748 R8G8B8A8_PREMULTIPLIED = 2, 749 /** 750 * 4 bytes; for blue, green, red, alpha. 751 */ 752 B8G8R8A8 = 3, 753 /** 754 * 4 bytes; for alpha, red, green, blue. 755 */ 756 A8R8G8B8 = 4, 757 /** 758 * 4 bytes; for red, green, blue, alpha. 759 */ 760 R8G8B8A8 = 5, 761 /** 762 * 4 bytes; for alpha, blue, green, red. 763 */ 764 A8B8G8R8 = 6, 765 /** 766 * 3 bytes; for red, green, blue. The data is opaque. 767 */ 768 R8G8B8 = 7, 769 /** 770 * 3 bytes; for blue, green, red. The data is opaque. 771 */ 772 B8G8R8 = 8, 773 /** 774 * 3 guint16 values; for red, green, blue. Since: 4.6 775 */ 776 R16G16B16 = 9, 777 /** 778 * 4 guint16 values; for red, green, 779 * blue, alpha. The color values are premultiplied with the alpha value. 780 * Since: 4.6 781 */ 782 R16G16B16A16_PREMULTIPLIED = 10, 783 /** 784 * 4 guint16 values; for red, green, blue, alpha. 785 * Since: 4.6 786 */ 787 R16G16B16A16 = 11, 788 /** 789 * 3 half-float values; for red, green, blue. 790 * The data is opaque. Since: 4.6 791 */ 792 R16G16B16_FLOAT = 12, 793 /** 794 * 4 half-float values; for 795 * red, green, blue and alpha. The color values are premultiplied with 796 * the alpha value. Since: 4.6 797 */ 798 R16G16B16A16_FLOAT_PREMULTIPLIED = 13, 799 /** 800 * 4 half-float values; for red, green, 801 * blue and alpha. Since: 4.6 802 */ 803 R16G16B16A16_FLOAT = 14, 804 R32G32B32_FLOAT = 15, 805 /** 806 * 4 float values; for 807 * red, green, blue and alpha. The color values are premultiplied with 808 * the alpha value. Since: 4.6 809 */ 810 R32G32B32A32_FLOAT_PREMULTIPLIED = 16, 811 /** 812 * 4 float values; for red, green, blue and 813 * alpha. Since: 4.6 814 */ 815 R32G32B32A32_FLOAT = 17, 816 /** 817 * The number of formats. This value will change as 818 * more formats get added, so do not rely on its concrete integer. 819 */ 820 N_FORMATS = 18, 821 } 822 alias GdkMemoryFormat MemoryFormat; 823 824 /** 825 * Flags to indicate the state of modifier keys and mouse buttons 826 * in events. 827 * 828 * Typical modifier keys are Shift, Control, Meta, Super, Hyper, Alt, Compose, 829 * Apple, CapsLock or ShiftLock. 830 * 831 * Note that GDK may add internal values to events which include values outside 832 * of this enumeration. Your code should preserve and ignore them. You can use 833 * %GDK_MODIFIER_MASK to remove all private values. 834 */ 835 public enum GdkModifierType 836 { 837 /** 838 * the Shift key. 839 */ 840 SHIFT_MASK = 1, 841 /** 842 * a Lock key (depending on the modifier mapping of the 843 * X server this may either be CapsLock or ShiftLock). 844 */ 845 LOCK_MASK = 2, 846 /** 847 * the Control key. 848 */ 849 CONTROL_MASK = 4, 850 /** 851 * the fourth modifier key (it depends on the modifier 852 * mapping of the X server which key is interpreted as this modifier, but 853 * normally it is the Alt key). 854 */ 855 ALT_MASK = 8, 856 /** 857 * the first mouse button. 858 */ 859 BUTTON1_MASK = 256, 860 /** 861 * the second mouse button. 862 */ 863 BUTTON2_MASK = 512, 864 /** 865 * the third mouse button. 866 */ 867 BUTTON3_MASK = 1024, 868 /** 869 * the fourth mouse button. 870 */ 871 BUTTON4_MASK = 2048, 872 /** 873 * the fifth mouse button. 874 */ 875 BUTTON5_MASK = 4096, 876 /** 877 * the Super modifier 878 */ 879 SUPER_MASK = 67108864, 880 /** 881 * the Hyper modifier 882 */ 883 HYPER_MASK = 134217728, 884 /** 885 * the Meta modifier 886 */ 887 META_MASK = 268435456, 888 } 889 alias GdkModifierType ModifierType; 890 891 /** 892 * Specifies the kind of crossing for enter and leave events. 893 * 894 * See the X11 protocol specification of LeaveNotify for 895 * full details of crossing event generation. 896 */ 897 public enum GdkNotifyType 898 { 899 /** 900 * the surface is entered from an ancestor or 901 * left towards an ancestor. 902 */ 903 ANCESTOR = 0, 904 /** 905 * the pointer moves between an ancestor and an 906 * inferior of the surface. 907 */ 908 VIRTUAL = 1, 909 /** 910 * the surface is entered from an inferior or 911 * left towards an inferior. 912 */ 913 INFERIOR = 2, 914 /** 915 * the surface is entered from or left towards 916 * a surface which is neither an ancestor nor an inferior. 917 */ 918 NONLINEAR = 3, 919 /** 920 * the pointer moves between two surfaces 921 * which are not ancestors of each other and the surface is part of 922 * the ancestor chain between one of these surfaces and their least 923 * common ancestor. 924 */ 925 NONLINEAR_VIRTUAL = 4, 926 /** 927 * an unknown type of enter/leave event occurred. 928 */ 929 UNKNOWN = 5, 930 } 931 alias GdkNotifyType NotifyType; 932 933 /** 934 * Flags about a paintable object. 935 * 936 * Implementations use these for optimizations such as caching. 937 */ 938 public enum GdkPaintableFlags 939 { 940 /** 941 * The size is immutable. 942 * The [signal@GdkPaintable::invalidate-size] signal will never be 943 * emitted. 944 */ 945 SIZE = 1, 946 /** 947 * The content is immutable. 948 * The [signal@GdkPaintable::invalidate-contents] signal will never be 949 * emitted. 950 */ 951 CONTENTS = 2, 952 } 953 alias GdkPaintableFlags PaintableFlags; 954 955 /** 956 * Specifies the direction for scroll events. 957 */ 958 public enum GdkScrollDirection 959 { 960 /** 961 * the surface is scrolled up. 962 */ 963 UP = 0, 964 /** 965 * the surface is scrolled down. 966 */ 967 DOWN = 1, 968 /** 969 * the surface is scrolled to the left. 970 */ 971 LEFT = 2, 972 /** 973 * the surface is scrolled to the right. 974 */ 975 RIGHT = 3, 976 /** 977 * the scrolling is determined by the delta values 978 * in scroll events. See gdk_scroll_event_get_deltas() 979 */ 980 SMOOTH = 4, 981 } 982 alias GdkScrollDirection ScrollDirection; 983 984 /** 985 * Flags describing the seat capabilities. 986 */ 987 public enum GdkSeatCapabilities 988 { 989 /** 990 * No input capabilities 991 */ 992 NONE = 0, 993 /** 994 * The seat has a pointer (e.g. mouse) 995 */ 996 POINTER = 1, 997 /** 998 * The seat has touchscreen(s) attached 999 */ 1000 TOUCH = 2, 1001 /** 1002 * The seat has drawing tablet(s) attached 1003 */ 1004 TABLET_STYLUS = 4, 1005 /** 1006 * The seat has keyboard(s) attached 1007 */ 1008 KEYBOARD = 8, 1009 /** 1010 * The seat has drawing tablet pad(s) attached 1011 */ 1012 TABLET_PAD = 16, 1013 /** 1014 * The union of all pointing capabilities 1015 */ 1016 ALL_POINTING = 7, 1017 /** 1018 * The union of all capabilities 1019 */ 1020 ALL = 15, 1021 } 1022 alias GdkSeatCapabilities SeatCapabilities; 1023 1024 /** 1025 * This enumeration describes how the red, green and blue components 1026 * of physical pixels on an output device are laid out. 1027 */ 1028 public enum GdkSubpixelLayout 1029 { 1030 /** 1031 * The layout is not known 1032 */ 1033 UNKNOWN = 0, 1034 /** 1035 * Not organized in this way 1036 */ 1037 NONE = 1, 1038 /** 1039 * The layout is horizontal, the order is RGB 1040 */ 1041 HORIZONTAL_RGB = 2, 1042 /** 1043 * The layout is horizontal, the order is BGR 1044 */ 1045 HORIZONTAL_BGR = 3, 1046 /** 1047 * The layout is vertical, the order is RGB 1048 */ 1049 VERTICAL_RGB = 4, 1050 /** 1051 * The layout is vertical, the order is BGR 1052 */ 1053 VERTICAL_BGR = 5, 1054 } 1055 alias GdkSubpixelLayout SubpixelLayout; 1056 1057 /** 1058 * Determines a surface edge or corner. 1059 */ 1060 public enum GdkSurfaceEdge 1061 { 1062 /** 1063 * the top left corner. 1064 */ 1065 NORTH_WEST = 0, 1066 /** 1067 * the top edge. 1068 */ 1069 NORTH = 1, 1070 /** 1071 * the top right corner. 1072 */ 1073 NORTH_EAST = 2, 1074 /** 1075 * the left edge. 1076 */ 1077 WEST = 3, 1078 /** 1079 * the right edge. 1080 */ 1081 EAST = 4, 1082 /** 1083 * the lower left corner. 1084 */ 1085 SOUTH_WEST = 5, 1086 /** 1087 * the lower edge. 1088 */ 1089 SOUTH = 6, 1090 /** 1091 * the lower right corner. 1092 */ 1093 SOUTH_EAST = 7, 1094 } 1095 alias GdkSurfaceEdge SurfaceEdge; 1096 1097 /** 1098 * Possible errors that can be returned by `GdkTexture` constructors. 1099 * 1100 * Since: 4.6 1101 */ 1102 public enum GdkTextureError 1103 { 1104 /** 1105 * Not enough memory to handle this image 1106 */ 1107 TOO_LARGE = 0, 1108 /** 1109 * The image data appears corrupted 1110 */ 1111 CORRUPT_IMAGE = 1, 1112 /** 1113 * The image contains features 1114 * that cannot be loaded 1115 */ 1116 UNSUPPORTED_CONTENT = 2, 1117 /** 1118 * The image format is not supported 1119 */ 1120 UNSUPPORTED_FORMAT = 3, 1121 } 1122 alias GdkTextureError TextureError; 1123 1124 public enum GdkTitlebarGesture 1125 { 1126 DOUBLE_CLICK = 1, 1127 RIGHT_CLICK = 2, 1128 MIDDLE_CLICK = 3, 1129 } 1130 alias GdkTitlebarGesture TitlebarGesture; 1131 1132 /** 1133 * Specifies the state of a toplevel surface. 1134 * 1135 * On platforms that support information about individual edges, the 1136 * %GDK_TOPLEVEL_STATE_TILED state will be set whenever any of the individual 1137 * tiled states is set. On platforms that lack that support, the tiled state 1138 * will give an indication of tiledness without any of the per-edge states 1139 * being set. 1140 */ 1141 public enum GdkToplevelState 1142 { 1143 /** 1144 * the surface is minimized 1145 */ 1146 MINIMIZED = 1, 1147 /** 1148 * the surface is maximized 1149 */ 1150 MAXIMIZED = 2, 1151 /** 1152 * the surface is sticky 1153 */ 1154 STICKY = 4, 1155 /** 1156 * the surface is maximized without decorations 1157 */ 1158 FULLSCREEN = 8, 1159 /** 1160 * the surface is kept above other surfaces 1161 */ 1162 ABOVE = 16, 1163 /** 1164 * the surface is kept below other surfaces 1165 */ 1166 BELOW = 32, 1167 /** 1168 * the surface is presented as focused (with active decorations) 1169 */ 1170 FOCUSED = 64, 1171 /** 1172 * the surface is in a tiled state 1173 */ 1174 TILED = 128, 1175 /** 1176 * whether the top edge is tiled 1177 */ 1178 TOP_TILED = 256, 1179 /** 1180 * whether the top edge is resizable 1181 */ 1182 TOP_RESIZABLE = 512, 1183 /** 1184 * whether the right edge is tiled 1185 */ 1186 RIGHT_TILED = 1024, 1187 /** 1188 * whether the right edge is resizable 1189 */ 1190 RIGHT_RESIZABLE = 2048, 1191 /** 1192 * whether the bottom edge is tiled 1193 */ 1194 BOTTOM_TILED = 4096, 1195 /** 1196 * whether the bottom edge is resizable 1197 */ 1198 BOTTOM_RESIZABLE = 8192, 1199 /** 1200 * whether the left edge is tiled 1201 */ 1202 LEFT_TILED = 16384, 1203 /** 1204 * whether the left edge is resizable 1205 */ 1206 LEFT_RESIZABLE = 32768, 1207 } 1208 alias GdkToplevelState ToplevelState; 1209 1210 /** 1211 * Specifies the current state of a touchpad gesture. 1212 * 1213 * All gestures are guaranteed to begin with an event with phase 1214 * %GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, followed by 0 or several events 1215 * with phase %GDK_TOUCHPAD_GESTURE_PHASE_UPDATE. 1216 * 1217 * A finished gesture may have 2 possible outcomes, an event with phase 1218 * %GDK_TOUCHPAD_GESTURE_PHASE_END will be emitted when the gesture is 1219 * considered successful, this should be used as the hint to perform any 1220 * permanent changes. 1221 * 1222 * Cancelled gestures may be so for a variety of reasons, due to hardware 1223 * or the compositor, or due to the gesture recognition layers hinting the 1224 * gesture did not finish resolutely (eg. a 3rd finger being added during 1225 * a pinch gesture). In these cases, the last event will report the phase 1226 * %GDK_TOUCHPAD_GESTURE_PHASE_CANCEL, this should be used as a hint 1227 * to undo any visible/permanent changes that were done throughout the 1228 * progress of the gesture. 1229 */ 1230 public enum GdkTouchpadGesturePhase 1231 { 1232 /** 1233 * The gesture has begun. 1234 */ 1235 BEGIN = 0, 1236 /** 1237 * The gesture has been updated. 1238 */ 1239 UPDATE = 1, 1240 /** 1241 * The gesture was finished, changes 1242 * should be permanently applied. 1243 */ 1244 END = 2, 1245 /** 1246 * The gesture was cancelled, all 1247 * changes should be undone. 1248 */ 1249 CANCEL = 3, 1250 } 1251 alias GdkTouchpadGesturePhase TouchpadGesturePhase; 1252 1253 /** 1254 * Error enumeration for `GdkVulkanContext`. 1255 */ 1256 public enum GdkVulkanError 1257 { 1258 /** 1259 * Vulkan is not supported on this backend or has not been 1260 * compiled in. 1261 */ 1262 UNSUPPORTED = 0, 1263 /** 1264 * Vulkan support is not available on this Surface 1265 */ 1266 NOT_AVAILABLE = 1, 1267 } 1268 alias GdkVulkanError VulkanError; 1269 1270 struct GdkAppLaunchContext; 1271 1272 struct GdkButtonEvent; 1273 1274 struct GdkCairoContext; 1275 1276 struct GdkClipboard; 1277 1278 struct GdkContentDeserializer; 1279 1280 struct GdkContentFormats; 1281 1282 struct GdkContentFormatsBuilder; 1283 1284 struct GdkContentProvider 1285 { 1286 GObject parent; 1287 } 1288 1289 /** 1290 * Class structure for `GdkContentProvider`. 1291 */ 1292 struct GdkContentProviderClass 1293 { 1294 GObjectClass parentClass; 1295 /** */ 1296 extern(C) void function(GdkContentProvider* provider) contentChanged; 1297 /** */ 1298 extern(C) void function(GdkContentProvider* provider, GdkClipboard* clipboard) attachClipboard; 1299 /** */ 1300 extern(C) void function(GdkContentProvider* provider, GdkClipboard* clipboard) detachClipboard; 1301 /** 1302 * 1303 * Params: 1304 * provider = a `GdkContentProvider` 1305 * Returns: The formats of the provider 1306 */ 1307 extern(C) GdkContentFormats* function(GdkContentProvider* provider) refFormats; 1308 /** 1309 * 1310 * Params: 1311 * provider = a `GdkContentProvider` 1312 * Returns: The storable formats of the provider 1313 */ 1314 extern(C) GdkContentFormats* function(GdkContentProvider* provider) refStorableFormats; 1315 /** */ 1316 extern(C) void function(GdkContentProvider* provider, const(char)* mimeType, GOutputStream* stream, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) writeMimeTypeAsync; 1317 /** 1318 * 1319 * Params: 1320 * provider = a `GdkContentProvider` 1321 * result = a `GAsyncResult` 1322 * Returns: %TRUE if the operation was completed successfully. Otherwise 1323 * @error will be set to describe the failure. 1324 * 1325 * Throws: GException on failure. 1326 */ 1327 extern(C) int function(GdkContentProvider* provider, GAsyncResult* result, GError** err) writeMimeTypeFinish; 1328 /** 1329 * 1330 * Params: 1331 * provider = a `GdkContentProvider` 1332 * value = the `GValue` to fill 1333 * Returns: %TRUE if the value was set successfully. Otherwise 1334 * @error will be set to describe the failure. 1335 * 1336 * Throws: GException on failure. 1337 */ 1338 extern(C) int function(GdkContentProvider* provider, GValue* value, GError** err) getValue; 1339 void*[8] padding; 1340 } 1341 1342 struct GdkContentSerializer; 1343 1344 struct GdkCrossingEvent; 1345 1346 struct GdkCursor; 1347 1348 struct GdkDNDEvent; 1349 1350 struct GdkDeleteEvent; 1351 1352 struct GdkDevice; 1353 1354 struct GdkDevicePad; 1355 1356 struct GdkDevicePadInterface; 1357 1358 struct GdkDeviceTool; 1359 1360 struct GdkDisplay; 1361 1362 struct GdkDisplayManager; 1363 1364 struct GdkDrag; 1365 1366 struct GdkDragSurface; 1367 1368 /** 1369 * The `GdkDragSurfaceInterface` implementation is private to GDK. 1370 */ 1371 struct GdkDragSurfaceInterface; 1372 1373 struct GdkDrawContext; 1374 1375 struct GdkDrop; 1376 1377 struct GdkEvent; 1378 1379 /** 1380 * `GdkEventSequence` is an opaque type representing a sequence 1381 * of related touch events. 1382 */ 1383 struct GdkEventSequence; 1384 1385 struct GdkFileList; 1386 1387 struct GdkFocusEvent; 1388 1389 struct GdkFrameClock; 1390 1391 struct GdkFrameClockClass; 1392 1393 struct GdkFrameClockPrivate; 1394 1395 struct GdkFrameTimings; 1396 1397 struct GdkGLContext; 1398 1399 struct GdkGLTexture; 1400 1401 struct GdkGLTextureClass; 1402 1403 struct GdkGrabBrokenEvent; 1404 1405 struct GdkKeyEvent; 1406 1407 /** 1408 * A `GdkKeymapKey` is a hardware key that can be mapped to a keyval. 1409 */ 1410 struct GdkKeymapKey 1411 { 1412 /** 1413 * the hardware keycode. This is an identifying number for a 1414 * physical key. 1415 */ 1416 uint keycode; 1417 /** 1418 * indicates movement in a horizontal direction. Usually groups are used 1419 * for two different languages. In group 0, a key might have two English 1420 * characters, and in group 1 it might have two Hebrew characters. The Hebrew 1421 * characters will be printed on the key next to the English characters. 1422 */ 1423 int group; 1424 /** 1425 * indicates which symbol on the key will be used, in a vertical direction. 1426 * So on a standard US keyboard, the key with the number “1” on it also has the 1427 * exclamation point ("!") character on it. The level indicates whether to use 1428 * the “1” or the “!” symbol. The letter keys are considered to have a lowercase 1429 * letter at level 0, and an uppercase letter at level 1, though only the 1430 * uppercase letter is printed. 1431 */ 1432 int level; 1433 } 1434 1435 struct GdkMemoryTexture; 1436 1437 struct GdkMemoryTextureClass; 1438 1439 struct GdkMonitor; 1440 1441 struct GdkMonitorClass; 1442 1443 struct GdkMotionEvent; 1444 1445 struct GdkPadEvent; 1446 1447 struct GdkPaintable; 1448 1449 /** 1450 * The list of functions that can be implemented for the `GdkPaintable` 1451 * interface. 1452 * 1453 * Note that apart from the [vfunc@Gdk.Paintable.snapshot] function, 1454 * no virtual function of this interface is mandatory to implement, though it 1455 * is a good idea to implement [vfunc@Gdk.Paintable.get_current_image] 1456 * for non-static paintables and [vfunc@Gdk.Paintable.get_flags] if the 1457 * image is not dynamic as the default implementation returns no flags and 1458 * that will make the implementation likely quite slow. 1459 */ 1460 struct GdkPaintableInterface 1461 { 1462 GTypeInterface gIface; 1463 /** */ 1464 extern(C) void function(GdkPaintable* paintable, GdkSnapshot* snapshot, double width, double height) snapshot; 1465 /** 1466 * 1467 * Params: 1468 * paintable = a `GdkPaintable` 1469 * Returns: An immutable paintable for the current 1470 * contents of @paintable 1471 */ 1472 extern(C) GdkPaintable* function(GdkPaintable* paintable) getCurrentImage; 1473 /** 1474 * 1475 * Params: 1476 * paintable = a `GdkPaintable` 1477 * Returns: The `GdkPaintableFlags` for this paintable 1478 */ 1479 extern(C) GdkPaintableFlags function(GdkPaintable* paintable) getFlags; 1480 /** 1481 * 1482 * Params: 1483 * paintable = a `GdkPaintable` 1484 * Returns: the intrinsic width of @paintable or 0 if none. 1485 */ 1486 extern(C) int function(GdkPaintable* paintable) getIntrinsicWidth; 1487 /** 1488 * 1489 * Params: 1490 * paintable = a `GdkPaintable` 1491 * Returns: the intrinsic height of @paintable or 0 if none. 1492 */ 1493 extern(C) int function(GdkPaintable* paintable) getIntrinsicHeight; 1494 /** 1495 * 1496 * Params: 1497 * paintable = a `GdkPaintable` 1498 * Returns: the intrinsic aspect ratio of @paintable or 0 if none. 1499 */ 1500 extern(C) double function(GdkPaintable* paintable) getIntrinsicAspectRatio; 1501 } 1502 1503 struct GdkPopup; 1504 1505 struct GdkPopupInterface; 1506 1507 struct GdkPopupLayout; 1508 1509 struct GdkProximityEvent; 1510 1511 struct GdkRGBA 1512 { 1513 /** 1514 * The intensity of the red channel from 0.0 to 1.0 inclusive 1515 */ 1516 float red; 1517 /** 1518 * The intensity of the green channel from 0.0 to 1.0 inclusive 1519 */ 1520 float green; 1521 /** 1522 * The intensity of the blue channel from 0.0 to 1.0 inclusive 1523 */ 1524 float blue; 1525 /** 1526 * The opacity of the color from 0.0 for completely translucent to 1527 * 1.0 for opaque 1528 */ 1529 float alpha; 1530 } 1531 1532 /** 1533 * A `GdkRectangle` data type for representing rectangles. 1534 * 1535 * `GdkRectangle` is identical to `cairo_rectangle_t`. Together with Cairo’s 1536 * `cairo_region_t` data type, these are the central types for representing 1537 * sets of pixels. 1538 * 1539 * The intersection of two rectangles can be computed with 1540 * [method@Gdk.Rectangle.intersect]; to find the union of two rectangles use 1541 * [method@Gdk.Rectangle.union]. 1542 * 1543 * The `cairo_region_t` type provided by Cairo is usually used for managing 1544 * non-rectangular clipping of graphical operations. 1545 * 1546 * The Graphene library has a number of other data types for regions and 1547 * volumes in 2D and 3D. 1548 */ 1549 struct GdkRectangle 1550 { 1551 /** 1552 * the x coordinate of the top left corner 1553 */ 1554 int x; 1555 /** 1556 * the y coordinate of the top left corner 1557 */ 1558 int y; 1559 /** 1560 * the width of the rectangle 1561 */ 1562 int width; 1563 /** 1564 * the height of the rectangle 1565 */ 1566 int height; 1567 } 1568 1569 struct GdkScrollEvent; 1570 1571 struct GdkSeat 1572 { 1573 GObject parentInstance; 1574 } 1575 1576 struct GdkSnapshot; 1577 1578 struct GdkSnapshotClass; 1579 1580 struct GdkSurface; 1581 1582 struct GdkSurfaceClass; 1583 1584 struct GdkTexture; 1585 1586 struct GdkTextureClass; 1587 1588 /** 1589 * A `GdkTimeCoord` stores a single event in a motion history. 1590 */ 1591 struct GdkTimeCoord 1592 { 1593 /** 1594 * The timestamp for this event 1595 */ 1596 uint time; 1597 /** 1598 * Flags indicating what axes are present 1599 */ 1600 GdkAxisFlags flags; 1601 /** 1602 * axis values 1603 */ 1604 double[12] axes; 1605 } 1606 1607 struct GdkToplevel; 1608 1609 struct GdkToplevelInterface; 1610 1611 struct GdkToplevelLayout; 1612 1613 struct GdkToplevelSize; 1614 1615 struct GdkTouchEvent; 1616 1617 struct GdkTouchpadEvent; 1618 1619 struct GdkVulkanContext; 1620 1621 /** 1622 * The type of a function that can be registered with gdk_content_register_deserializer(). 1623 * 1624 * When the function gets called to operate on content, it can call functions on the 1625 * @deserializer object to obtain the mime type, input stream, user data, etc. for its 1626 * operation. 1627 * 1628 * Params: 1629 * deserializer = a `GdkContentDeserializer` 1630 */ 1631 public alias extern(C) void function(GdkContentDeserializer* deserializer) GdkContentDeserializeFunc; 1632 1633 /** 1634 * The type of a function that can be registered with gdk_content_register_serializer(). 1635 * 1636 * When the function gets called to operate on content, it can call functions on the 1637 * @serializer object to obtain the mime type, output stream, user data, etc. for its 1638 * operation. 1639 * 1640 * Params: 1641 * serializer = a `GdkContentSerializer` 1642 */ 1643 public alias extern(C) void function(GdkContentSerializer* serializer) GdkContentSerializeFunc; 1644 1645 /** 1646 * Defines all possible DND actions. 1647 * 1648 * This can be used in [method@Gdk.Drop.status] messages when any drop 1649 * can be accepted or a more specific drop method is not yet known. 1650 */ 1651 enum ACTION_ALL = 7; 1652 alias GDK_ACTION_ALL = ACTION_ALL; 1653 1654 /** 1655 * The middle button. 1656 */ 1657 enum BUTTON_MIDDLE = 2; 1658 alias GDK_BUTTON_MIDDLE = BUTTON_MIDDLE; 1659 1660 /** 1661 * The primary button. This is typically the left mouse button, or the 1662 * right button in a left-handed setup. 1663 */ 1664 enum BUTTON_PRIMARY = 1; 1665 alias GDK_BUTTON_PRIMARY = BUTTON_PRIMARY; 1666 1667 /** 1668 * The secondary button. This is typically the right mouse button, or the 1669 * left button in a left-handed setup. 1670 */ 1671 enum BUTTON_SECONDARY = 3; 1672 alias GDK_BUTTON_SECONDARY = BUTTON_SECONDARY; 1673 1674 /** 1675 * Represents the current time, and can be used anywhere a time is expected. 1676 */ 1677 enum CURRENT_TIME = 0; 1678 alias GDK_CURRENT_TIME = CURRENT_TIME; 1679 1680 /** 1681 * Use this macro as the return value for continuing the propagation of 1682 * an event handler. 1683 */ 1684 enum EVENT_PROPAGATE = false; 1685 alias GDK_EVENT_PROPAGATE = EVENT_PROPAGATE; 1686 1687 /** 1688 * Use this macro as the return value for stopping the propagation of 1689 * an event handler. 1690 */ 1691 enum EVENT_STOP = true; 1692 alias GDK_EVENT_STOP = EVENT_STOP; 1693 1694 /** 1695 * A mask covering all entries in `GdkModifierType`. 1696 */ 1697 enum MODIFIER_MASK = 469769999; 1698 alias GDK_MODIFIER_MASK = MODIFIER_MASK; 1699 1700 /** 1701 * This is the priority that the idle handler processing surface updates 1702 * is given in the main loop. 1703 */ 1704 enum PRIORITY_REDRAW = 120; 1705 alias GDK_PRIORITY_REDRAW = PRIORITY_REDRAW;